.orders-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f5f5f5;
  padding-bottom: 40rpx;
}

.custom-nav {
  background: white;
  border-bottom: 1rpx solid #f0f0f0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
  
  .nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15rpx 30rpx;
    height: 88rpx;
    gap: 20rpx;
  }
  
  .nav-title {
    font-size: 36rpx;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .search-wrapper {
    flex: 1;
    max-width: 400rpx;
    display: flex;
    align-items: center;
    background: #f5f7fa;
    border-radius: 30rpx;
    padding: 10rpx 20rpx;
    
    .search-icon {
      width: 28rpx;
      height: 28rpx;
      margin-right: 10rpx;
      opacity: 0.5;
    }
    
    .search-input {
      flex: 1;
      font-size: 26rpx;
      background: transparent;
      color: #333;
      
      &::placeholder {
        color: #999;
        font-size: 26rpx;
      }
    }
  }
}

/* 登录提示 */
.login-prompt {
  height: calc(100vh - 120rpx);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60rpx;
  
  .login-card {
    background: white;
    border-radius: 20rpx;
    padding: 80rpx 60rpx;
    text-align: center;
    box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500rpx;
    
    .login-icon {
      width: 120rpx;
      height: 120rpx;
      margin-bottom: 40rpx;
      opacity: 0.6;
    }
    
    .login-title {
      display: block;
      font-size: 36rpx;
      font-weight: bold;
      color: #333;
      margin-bottom: 20rpx;
    }
    
    .login-desc {
      display: block;
      font-size: 28rpx;
      color: #999;
      margin-bottom: 60rpx;
    }
    
    .login-btn {
      background: #5cb85c;
      color: white;
      border-radius: 50rpx;
      font-size: 32rpx;
      padding: 24rpx 80rpx;
      border: none;
      
      &::after {
        border: none;
      }
    }
  }
}

.main-content {
  flex: 1;
}


.search-bar {
  padding: 0 30rpx;
  background: white;
  border-bottom: 1rpx solid #f0f0f0;
  height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  
  &.show {
    height: 80rpx;
    padding: 20rpx 30rpx;
  }
  
  .search-input-wrapper {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25rpx;
    padding: 15rpx 25rpx;
    border: 2rpx solid transparent;
    
    &:focus-within {
      border-color: #5cb85c;
      background: white;
    }
    
    .search-input-icon {
      width: 32rpx;
      height: 32rpx;
      margin-right: 15rpx;
      opacity: 0.5;
    }
    
    .search-input {
      flex: 1;
      font-size: 28rpx;
      background: transparent;
    }
    
    .search-cancel {
      font-size: 28rpx;
      color: #5cb85c;
      margin-left: 15rpx;
    }
  }
}

.order-tabs {
  position: sticky;
  top: 88rpx; // 固定在custom-nav下方
  z-index: 99; // 低于custom-nav的100
  background: white;
  padding: 15rpx 30rpx;
  border-bottom: 1rpx solid #f0f0f0;
  
  .tabs-scroll {
    white-space: nowrap;
    
    .tab-item {
      display: inline-flex;
      align-items: center;
      padding: 12rpx 24rpx;
      margin-right: 12rpx;
      font-size: 28rpx;
      color: #666;
      background: white;
      border-radius: 20rpx;
      border: none;
      transition: all 0.3s ease;
      
      &.active {
        background: white;
        color: #333;
        font-weight: 600;
        border: 2rpx solid #5cb85c;
      }
    }
  }
}

/* 订单列表 */
.order-list {
  height: calc(100vh - 280rpx);
  padding: 20rpx;
}

.order-card {
  background: white;
  border-radius: 20rpx;
  margin-bottom: 24rpx;
  overflow: hidden;
  box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  
  &:active {
    transform: translateY(-2rpx);
    box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
  }
  
  /* 订单头部 */
  .order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28rpx 32rpx;
    background: #fafbfc;
    border-radius: 20rpx 20rpx 0 0;
    
    .header-left {
      flex: 1;
      
      .order-number {
        display: block;
        font-size: 28rpx;
        color: #333;
        font-weight: 600;
        margin-bottom: 8rpx;
      }
      
      .order-time {
        display: block;
        font-size: 24rpx;
        color: #999;
      }
    }
    
    .header-right {
      text-align: right;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      
      .order-status {
        display: inline-block;
        padding: 6rpx 16rpx;
        border-radius: 16rpx;
        font-size: 24rpx;
        font-weight: 500;
        margin-bottom: 8rpx;
        
        &.status-0 {
          background: #fff3cd;
          color: #856404;
        }
        
        &.status-1 {
          background: #cfe9ff;
          color: #0066cc;
        }
        
        &.status-2 {
          background: #fff0e6;
          color: #ff8000;
        }
        
        &.status-3 {
          background: #d4f0d4;
          color: #4caf50;
        }
        
        &.status-4 {
          background: #d4edda;
          color: #155724;
        }
        
        &.status-5 {
          background: #ffebee;
          color: #f44336;
        }
      }
      
      .delivery-time {
        font-size: 24rpx;
        color: #5cb85c;
        background: #e8f5e8;
        padding: 4rpx 12rpx;
        border-radius: 12rpx;
      }
    }
  }
  
  /* 商品列表 */
  .order-items {
    padding: 20rpx 30rpx;
    
    .item-row {
      display: flex;
      align-items: center;
      padding: 15rpx 0;
      border-bottom: 1rpx solid #f5f5f5;
      
      &:last-child {
        border-bottom: none;
      }
      
      .item-image {
        width: 100rpx;
        height: 100rpx;
        border-radius: 12rpx;
        margin-right: 20rpx;
        background: #f5f5f5;
      }
      
      .item-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        
        .item-name {
          font-size: 28rpx;
          color: #333;
          margin-bottom: 8rpx;
          font-weight: 500;
        }
        
        .item-price {
          font-size: 26rpx;
          color: #ff4757;
        }
      }
      
      .item-quantity {
        font-size: 26rpx;
        color: #666;
        margin-left: 20rpx;
      }
    }
  }
  
  /* 订单汇总 */
  .order-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20rpx 30rpx;
    background: #fafbfc;
    
    .summary-text {
      font-size: 26rpx;
      color: #666;
    }
    
    .summary-amount {
      display: flex;
      align-items: baseline;
      
      .amount-label {
        font-size: 26rpx;
        color: #666;
        margin-right: 8rpx;
      }
      
      .amount-value {
        font-size: 32rpx;
        color: #ff4757;
        font-weight: bold;
      }
    }
  }
  
  /* 备注信息 */
  .order-note {
    display: flex;
    align-items: flex-start;
    padding: 20rpx 30rpx;
    background: #fffbf0;
    border-top: 1rpx solid #f0f0f0;
    
    .note-icon {
      width: 30rpx;
      height: 30rpx;
      margin-right: 15rpx;
      margin-top: 5rpx;
      opacity: 0.6;
    }
    
    .note-text {
      flex: 1;
      font-size: 26rpx;
      color: #856404;
      line-height: 1.4;
    }
  }
  
  /* 订单操作 */
  .order-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15rpx;
    padding: 25rpx 32rpx;
    background: #ffffff;
    border-radius: 0 0 20rpx 20rpx;
    
    .action-btn {
      padding: 18rpx 32rpx;
      border-radius: 30rpx;
      font-size: 26rpx;
      border: none;
      font-weight: 500;
      
      &.primary {
        background: linear-gradient(135deg, #5cb85c 0%, #7cc87c 100%);
        color: white;
        box-shadow: 0 4rpx 12rpx rgba(92, 184, 92, 0.3);
      }
      
      &.secondary {
        background: #f5f7fa;
        color: #666;
        border: 1rpx solid #e5e7eb;
      }
      
      &::after {
        border: none;
      }
      
      &:active {
        opacity: 0.8;
      }
    }
  }
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100rpx 60rpx;
  text-align: center;
  
  .empty-icon {
    width: 200rpx;
    height: 200rpx;
    margin-bottom: 30rpx;
    opacity: 0.3;
  }
  
  .empty-text {
    font-size: 30rpx;
    color: #999;
  }
}

/* 加载更多 */
.load-more {
  text-align: center;
  padding: 40rpx;
  
  text {
    font-size: 28rpx;
    color: #5cb85c;
    padding: 20rpx;
  }
}

/* 弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40rpx;
}

.modal-content {
  background: white;
  border-radius: 20rpx;
  width: 100%;
  max-width: 700rpx;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  
  .modal-header {
    display: flex;
    align-items: center;
    padding: 25rpx 30rpx;
    border-bottom: 1rpx solid #f0f0f0;
    position: relative;
    
    .modal-close {
      font-size: 56rpx;
      color: #666;
      line-height: 1;
      padding: 10rpx;
      width: 60rpx;
      height: 60rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #f5f5f5;
      border-radius: 50%;
      margin-right: 20rpx;
      flex-shrink: 0;
      
      &:active {
        background: #e0e0e0;
      }
    }
    
    .modal-title {
      font-size: 32rpx;
      font-weight: bold;
      color: #333;
      flex: 1;
      text-align: left;
    }
  }
  
  .modal-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    
    .detail-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 25rpx 30rpx;
      background: #f8f9fa;
      border-bottom: 1rpx solid #f0f0f0;
      
      .detail-order-no {
        font-size: 28rpx;
        color: #333;
        font-weight: 600;
      }
      
      .detail-status {
        padding: 6rpx 16rpx;
        border-radius: 16rpx;
        font-size: 24rpx;
        font-weight: 500;
        
        &.status-0 {
          background: #fff3cd;
          color: #856404;
        }
        &.status-1 {
          background: #cfe9ff;
          color: #0066cc;
        }
        &.status-2 {
          background: #fff0e6;
          color: #ff8000;
        }
      }
    }
    
    .detail-section {
      padding: 25rpx 30rpx;
      border-bottom: 1rpx solid #f0f0f0;
      
      .section-title {
        display: block;
        font-size: 26rpx;
        font-weight: 600;
        color: #666;
        margin-bottom: 20rpx;
      }
      
      .detail-items {
        .detail-item-row {
          display: flex;
          align-items: center;
          padding: 15rpx 0;
          border-bottom: 1rpx solid #f5f5f5;
          
          &:last-child {
            border-bottom: none;
          }
          
          .detail-item-image {
            width: 100rpx;
            height: 100rpx;
            border-radius: 12rpx;
            margin-right: 20rpx;
            background: #f5f5f5;
          }
          
          .detail-item-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            
            .detail-item-name {
              font-size: 28rpx;
              color: #333;
              margin-bottom: 8rpx;
              font-weight: 500;
            }
            
            .detail-item-price {
              font-size: 26rpx;
              color: #ff4757;
            }
          }
          
          .detail-item-quantity {
            font-size: 26rpx;
            color: #666;
            margin-left: 20rpx;
          }
        }
      }
      
      .fee-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        
        .fee-value {
          font-size: 32rpx;
          color: #333;
          font-weight: 600;
          
          &.price-highlight {
            color: #ff4757;
          }
          
          &.income-highlight {
            color: #5cb85c;
          }
        }
      }
    }
    
    .fee-list {
      padding: 0 30rpx;
      
      .fee-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15rpx 0;
        border-bottom: 1rpx solid #f5f5f5;
        
        &:last-child {
          border-bottom: none;
        }
        
        .fee-label {
          font-size: 26rpx;
          color: #666;
        }
        
        .fee-value {
          font-size: 26rpx;
          color: #333;
          
          &.discount {
            color: #ff4757;
          }
        }
      }
    }
    
    .delivery-info {
      .delivery-row {
        display: flex;
        align-items: center;
        padding: 12rpx 0;
        
        .delivery-icon {
          width: 32rpx;
          height: 32rpx;
          margin-right: 15rpx;
          opacity: 0.6;
        }
        
        .delivery-text {
          flex: 1;
          font-size: 26rpx;
          color: #666;
          
          &.delivery-time {
            color: #5cb85c;
          }
        }
      }
    }
    
    .order-info-list {
      .info-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15rpx 0;
        border-bottom: 1rpx solid #f5f5f5;
        
        &:last-child {
          border-bottom: none;
        }
        
        .info-label {
          font-size: 26rpx;
          color: #666;
        }
        
        .info-value {
          font-size: 26rpx;
          color: #333;
          font-weight: 500;
        }
      }
    }
    
    .item-list {
      .item-detail {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20rpx 0;
        border-bottom: 1rpx solid #f0f0f0;
        
        &:last-child {
          border-bottom: none;
        }
        
        .item-name {
          font-size: 28rpx;
          color: #333;
          flex: 1;
        }
        
        .item-spec {
          font-size: 26rpx;
          color: #666;
          margin: 0 20rpx;
        }
        
        .item-price {
          font-size: 28rpx;
          color: #ff4757;
          font-weight: 500;
        }
      }
    }
    
    .fee-list {
      .fee-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15rpx 0;
        border-bottom: 1rpx solid #f0f0f0;
        
        &.total {
          border-top: 2rpx solid #5cb85c;
          border-bottom: none;
          padding-top: 20rpx;
          margin-top: 15rpx;
          font-weight: bold;
          
          .fee-value {
            font-size: 32rpx;
            color: #5cb85c;
          }
        }
        
        &:last-child:not(.total) {
          border-bottom: none;
        }
        
        .fee-label {
          font-size: 26rpx;
          color: #666;
        }
        
        .fee-value {
          font-size: 28rpx;
          color: #333;
          
          &.discount {
            color: #5cb85c;
          }
        }
      }
    }
    
    // 联系用户弹窗样式
    .contact-info {
      background: #f8f9fa;
      padding: 25rpx;
      border-radius: 12rpx;
      margin-bottom: 25rpx;
      
      .contact-name,
      .contact-phone,
      .order-info {
        display: block;
        font-size: 26rpx;
        color: #333;
        margin-bottom: 8rpx;
        
        &:last-child {
          margin-bottom: 0;
        }
      }
      
      .contact-phone {
        color: #5cb85c;
        font-weight: 500;
      }
    }
    
    .contact-methods {
      margin-bottom: 25rpx;
      
      .method-title {
        display: block;
        font-size: 28rpx;
        font-weight: bold;
        color: #333;
        margin-bottom: 15rpx;
      }
      
      radio-group {
        display: flex;
        gap: 30rpx;
        
        radio {
          font-size: 26rpx;
          color: #666;
        }
      }
    }
    
    .contact-notes {
      .notes-label {
        display: block;
        font-size: 28rpx;
        font-weight: bold;
        color: #333;
        margin-bottom: 15rpx;
      }
      
      .notes-input {
        width: 100%;
        min-height: 120rpx;
        padding: 20rpx;
        border: 2rpx solid #e0e0e0;
        border-radius: 12rpx;
        font-size: 26rpx;
        background: #fafafa;
        line-height: 1.5;
        
        &:focus {
          border-color: #5cb85c;
          background: white;
        }
      }
    }
  }
  
  .modal-footer {
    display: flex;
    gap: 15rpx;
    padding: 25rpx 30rpx;
    border-top: 1rpx solid #f0f0f0;
    background: white;
    
    .footer-btn {
      flex: 1;
      padding: 22rpx;
      border-radius: 30rpx;
      font-size: 28rpx;
      border: none;
      
      &.secondary {
        background: white;
        color: #666;
        border: 2rpx solid #e0e0e0;
      }
      
      &.primary {
        background: #5cb85c;
        color: white;
        border: none;
      }
      
      &::after {
        border: none;
      }
      
      &:active {
        opacity: 0.8;
      }
    }
  }
}

/* 详情弹窗特殊样式 */
.detail-modal {
  max-height: 90vh;
}

/* 联系弹窗特殊样式 */
.contact-modal {
  max-height: 70vh;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100rpx 60rpx;
  text-align: center;
  
  .empty-icon {
    width: 200rpx;
    height: 200rpx;
    margin-bottom: 30rpx;
    opacity: 0.3;
  }
  
  .empty-text {
    font-size: 30rpx;
    color: #999;
  }
}

/* 加载更多 */
.load-more {
  text-align: center;
  padding: 40rpx;
  
  text {
    font-size: 28rpx;
    color: #5cb85c;
    padding: 20rpx;
  }
}